<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Honeydew管理介面</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- Jquery -->
<script src="http://code.jquery.com/jquery.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<script src="${pageContext.request.contextPath}/js/jquery.blockUI.js"></script>
<!-- carousel -->
<link href="${pageContext.request.contextPath}/css/carousel.css" rel="stylesheet" />
<!-- Bootstrap -->
<link href="${pageContext.request.contextPath}/bootstrap-3.1.1-dist/css/bootstrap.min.css" rel="stylesheet" media="screen" />
<script src="${pageContext.request.contextPath}/bootstrap-3.1.1-dist/js/bootstrap.min.js"></script>
<!-- responsive -->
<link href="${pageContext.request.contextPath}/css/bootstrap-responsive.css" rel="stylesheet" type="text/css">
<!-- holder -->
<script src="${pageContext.request.contextPath}/holder/holder.js"></script>
<!-- commons -->
<link href="${pageContext.request.contextPath}/css/commons.css" rel="stylesheet" />

<!-- Manage -->
<script src="${pageContext.request.contextPath}/js/manage.js"></script>
<script>
$(document).ajaxStart($.blockUI).ajaxStop($.unblockUI);
$(function() {
  $( "input[name*='itemInformationBo.Startdate']" ).datepicker({
  	dateFormat: "yy-mm-dd"
  });
  $( "input[name*='itemInformationBo.Enddate']" ).datepicker({
	  	dateFormat: "yy-mm-dd"
	  });
  
  //ajaxChangeCategoryBig($("select[name*='categoryBigBo.Seqid']").val());
});
</script>
</head>

<body>
<s:set var="theme" value="'simple'" scope="page" />
<s:form action="saveUpdateItemInformation" enctype="multipart/form-data">
	<h1>商品資訊管理</h1>
	<table width="100%" height="100%">
		<tr>
			<td>
				<s:include value="manage_head.jsp" />
			</td>
		</tr>
		<tr>
			<td>
				<s:hidden theme="simple" id="itemInformationBo.Seqid" name="itemInformationBo.Seqid" />
				<table width="100%" class="table table-bordered">
					<tr>
						<th>商品編號</th>
						<td colspan="1">
							<s:property value="itemInformationBo.Number" />
							<s:hidden theme="simple" id="itemInformationBo.Number" name="itemInformationBo.Number" />
						</td>
						<th>商品名稱</th>
						<td colspan="1">
							<s:textfield theme="simple" id="itemInformationBo.Name" name="itemInformationBo.Name" />
						</td>
					</tr>
					<tr>
						<th>商品分類</th>
						<td colspan="3">
							<select id="itemInformationBo.CategoryBMStr" name="itemInformationBo.CategoryBMStr">
								<s:iterator value="categoryBMList">
									<option value="<s:property value='Seqid'/>"><s:property value="Name"/></option>									
								</s:iterator>
							</select>
							<%-- <select id="categoryBigBo.Seqid" name="categoryBigBo.Seqid"> <!-- onchange="ajaxChangeCategoryBig(this.value);" -->								
								<s:iterator value="categoryBigList">
									<option value="<s:property value='Seqid'/>"><s:property value="Name"/></option>									
								</s:iterator>
							</select>
							<select id="categoryMediumBo.Seqid" name="categoryMediumBo.Seqid">
								<s:iterator value="categoryMediumList">
									<option value="<s:property value='Seqid'/>"><s:property value="Name"/></option>
								</s:iterator>
							</select> --%>
						</td>
					</tr>
					<tr>
						<th>商品描述</th>
						<td colspan="1">
							<s:textfield theme="simple" id="itemInformationBo.Description" name="itemInformationBo.Description" />
						</td>
						<th>商品材質</th>
						<td colspan="1">
							<s:textfield theme="simple" id="itemInformationBo.Material" name="itemInformationBo.Material" />
						</td>
					</tr>
					<tr>
						<th>商品價格</th>
						<td colspan="1">
							<s:textfield theme="simple" id="itemInformationBo.Price" name="itemInformationBo.Price" />
						</td>
						<th>商品狀態</th>
						<td colspan="1">
							<s:select theme="simple" id="itemInformationBo.State" name="itemInformationBo.State" list="#{1:'上架', 2:'下架'}"></s:select>
						</td>
					</tr>
					<tr>
						<th>開始日期</th>
						<td colspan="1">
							<s:textfield theme="simple" id="itemInformationBo.StartdateStr" name="itemInformationBo.StartdateStr" />
						</td>
						<th>結束日期</th>
						<td colspan="1">
							<s:textfield theme="simple" id="itemInformationBo.EnddateStr" name="itemInformationBo.EnddateStr" />
						</td>
					</tr>
					<tr>
						<th>主要圖片(1張)</th>
						<td colspan="3">
							<s:property value="itemInformationBo.Mainphoto" />
							<s:hidden id="itemInformationBo.Mainphoto" name="itemInformationBo.Mainphoto" />
							<s:file theme="simple" label="File" id="itemInformationBo.tmpMainphotoFile" name="itemInformationBo.tmpMainphotoFile"></s:file>
						</td>
					</tr>
					<tr>
						<th>次要圖片(至多8張)</th>
						<td colspan="1">
							<s:property value="itemInformationBo.Secondaryphoto" />
							<s:hidden id="itemInformationBo.Secondaryphoto" name="itemInformationBo.Secondaryphoto" />
							<s:file theme="simple" label="File" id="itemInformationBo.tmpSecondaryphotoFile" name="itemInformationBo.tmpSecondaryphotoFile"></s:file>
							<s:file theme="simple" label="File" id="itemInformationBo.tmpSecondaryphotoFile" name="itemInformationBo.tmpSecondaryphotoFile"></s:file>
							<s:file theme="simple" label="File" id="itemInformationBo.tmpSecondaryphotoFile" name="itemInformationBo.tmpSecondaryphotoFile"></s:file>
							<s:file theme="simple" label="File" id="itemInformationBo.tmpSecondaryphotoFile" name="itemInformationBo.tmpSecondaryphotoFile"></s:file>
							<s:file theme="simple" label="File" id="itemInformationBo.tmpSecondaryphotoFile" name="itemInformationBo.tmpSecondaryphotoFile"></s:file>
							<s:file theme="simple" label="File" id="itemInformationBo.tmpSecondaryphotoFile" name="itemInformationBo.tmpSecondaryphotoFile"></s:file>
							<s:file theme="simple" label="File" id="itemInformationBo.tmpSecondaryphotoFile" name="itemInformationBo.tmpSecondaryphotoFile"></s:file>
							<s:file theme="simple" label="File" id="itemInformationBo.tmpSecondaryphotoFile" name="itemInformationBo.tmpSecondaryphotoFile"></s:file>
						</td>
						<th>尺寸圖片(1張)</th>
						<td colspan="1">
							<s:property value="itemInformationBo.Sizephoto" />
							<s:hidden id="itemInformationBo.Sizephoto" name="itemInformationBo.Sizephoto" />
							<s:file theme="simple" label="File" id="itemInformationBo.tmpSizephotoFile" name="itemInformationBo.tmpSizephotoFile"></s:file>
						</td>
					</tr>
				</table>
				<div align="right">
					<s:submit id="saveBtn" cssClass="btn" value="儲存" />
				</div>
				
			</td>
		</tr>
	</table>
</s:form>
</body>
</html>